package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by oyhk on 16/7/15.
 */
@Entity
@Table(name = "customer_shipping_address")
@DynamicInsert
@DynamicUpdate
public class CustomerShoppingAddress extends IDEntityMall {


    @Column(columnDefinition = "varchar(100) comment '收货地址'")
    private String address;
    @Column(columnDefinition = "varchar(100) comment '收货人'",name = "shipping_man")
    private String shoppingMan;
    @Column(columnDefinition = "varchar(30) comment '收货人电话号码'",name = "shipping_man_phone")
    private String shoppingManPhone;
    @Column(columnDefinition = "bit comment '是否默认收货地址'")
    private Boolean isDefault = false;
    @Column(columnDefinition = "varchar(30) comment '邮政编码'")
    private String postcode;
    @Column(columnDefinition = "bigint  comment '地区id'")
    private Long locationId;
    @Column(columnDefinition = "bigint  comment '客户id'")
    private Long customerId;

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getShoppingMan() {
        return shoppingMan;
    }

    public void setShoppingMan(String shoppingMan) {
        this.shoppingMan = shoppingMan;
    }

    public String getShoppingManPhone() {
        return shoppingManPhone;
    }

    public void setShoppingManPhone(String shoppingManPhone) {
        this.shoppingManPhone = shoppingManPhone;
    }

    public Boolean getDefault() {
        return isDefault;
    }

    public void setDefault(Boolean aDefault) {
        isDefault = aDefault;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public Long getLocationId() {
        return locationId;
    }

    public void setLocationId(Long locationId) {
        this.locationId = locationId;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    @Override
    public String toString() {
        return "CustomerShoppingAddress{" +
                "address='" + address + '\'' +
                ", id=" + id +
                ", shoppingMan='" + shoppingMan + '\'' +
                ", dateCreated=" + dateCreated +
                ", shoppingManPhone='" + shoppingManPhone + '\'' +
                ", lastUpdated=" + lastUpdated +
                ", isDefault=" + isDefault +
                ", postcode='" + postcode + '\'' +
                ", isDelete=" + isDelete +
                ", locationId=" + locationId +
                ", version=" + version +
                ", customerId=" + customerId +
                '}';
    }
}
